package st.business.tepth.business.user.busnumber.workholder.maintain.pass;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.MaintainPassInfoBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;
import st.shadow.library.ui.recycler.MultipleItemEntity;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-03-23 09:46
 */

public interface MaintainPassContract {
    interface View extends BaseView {
        void showData(List<MultipleItemEntity> list);

        void showError(String msg);

        void checkNotPassSucceed();

        void checkPassSucceed();

        void cancelWorkSucceed();
    }

    interface Model extends BaseModel {
        Disposable getData(String token, int repairId,
                           OnDataConvertListener<List<MaintainPassInfoBean>> listener);

        Disposable checkNotPass(String token, String repairTaskList,
                                String comment,
                                OnDataConvertListener<String> listener);

        Disposable checkPass(String token, String repairTaskList,
                             OnDataConvertListener<String> listener);

        Disposable cancelFinishWork(String token, int repairId,
                                    OnDataConvertListener<String> listener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getData(String token, int repairId);

        abstract void checkNotPass(String token, String repairTaskList,
                                   String comment);

        abstract void checkPass(String token, String repairTaskList);

        abstract void cancelFinishWork(String token, int repairId);
    }
}
